package com.turing.post.tuxedo.util;

import java.io.Serializable;
import java.math.BigInteger;

import org.jdom2.Element;

import com.turing.post.util.PCPSApplicationException;

/**
 * 充值交易输出
 * 
 * @author yxb
 * 
 */
@SuppressWarnings("serial")
public class ODeposit extends TransResponse implements Serializable {
	/**
	 * 卡号
	 */
	public String cardNo = null;

	/**
	 * 卡余额
	 */
	public BigInteger balance = BigInteger.ZERO;

	/**
	 * 手续费
	 */
	public BigInteger fee = BigInteger.ZERO;

	/**
	 * 产生计算MAC的域
	 */
	@Override
	protected void generateMacField() {
	}

	/**
	 * 构造交易应答私有报文体
	 * 
	 * @param reqBody
	 * @throws Exception
	 */
	@Override
	protected void constructRespBodyXml(Element respBody)
			throws PCPSApplicationException {
		// Card
		Element card_el = new Element(TransXmlHelper.XML_NODE_Card);
		TransXmlHelper.addStringElement(card_el,
				TransXmlHelper.XML_NODE_CardNo, cardNo);
		TransXmlHelper.addStringElement(card_el, TransXmlHelper.XML_NODE_Fee,
				fee.toString());
		TransXmlHelper.addStringElement(card_el,
				TransXmlHelper.XML_NODE_Balance, balance.toString());
		respBody.addContent(card_el);
	}
}
